import request from '@/utils/request.js'

export const elementListService = (pid)=>{
    return request.get('/elements/list?pid='+pid)
}

export const elementAddService = (elementData,pid)=>{
    return request.post('/elements?pid=' + pid,elementData)
}


export const elementDeleteService = (id, pid)=>{
    return request.delete('/elements?id='+id + '&pid='+pid)
}


export const elementUpdateService = (elementData, pid)=>{
    return request.put('/elements?pid='+pid,elementData)
}